package com.example.baiduapi.Controller.txtController;

import com.example.baiduapi.Mapper.mysqlMapper.MessageMapper;
import com.example.baiduapi.domain.emnu.PageEnum;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

import static com.example.baiduapi.Controller.PageController.generateCacheBustedUrl;

@Controller
@CrossOrigin
@RequestMapping("/Thursday")
public class RedirectText {

    @Value("${server.HTTPURL}")
    private String HTTPURL;

    @Resource
    MessageMapper messagesMapper;
    @GetMapping("/vivo50")
    public String vivo50(){
        String url = generateCacheBustedUrl(PageEnum.VIVO50.value);
        return "redirect:"+url;
    }

    @GetMapping("/notepad")
    public String tiandog(){
        String url = generateCacheBustedUrl(PageEnum.NOTEPAD.value);
        return "redirect:"+url;
    }



}
